package org.duiduo.api.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.duiduo.api.valid.ValidationGroups;

import javax.validation.constraints.NotNull;

/**
 * 角色请求
 *
 * @author liangze
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "RoleRequest对象", description = "")
public class RoleRequest extends BaseRequest {

    /**
     * 角色编号
     */
    @ApiModelProperty(value = "角色编号")
    @NotNull(groups = {ValidationGroups.Update.class}, message = "角色编号不能为空")
    private Integer id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @NotNull(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}, message = "用户名不能为空")
    private String username;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @NotNull(groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}, message = "密码不能为空")
    private String password;
}
